fix(supervisor-network): warn on unsupported L7 access presets#2177
Conversation
Approve with minor suggestions — well-scoped, behavior-preserving. Actionable items:
Non-blocking design note: the unsupported-preset warning lives in expansion rather than |
Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
|
Thanks for your review @russellb. Incorporated all 4 suggestions: https://github.com/NVIDIA/OpenShell/compare/4c0029870a3f9cef2428d16547f63018ade3fde5..059c35caa41c2a7c3141439601548c2e13ba8342 |
|
Thanks for the updates! This lgtm. |
|
/ok to test 059c35c |
|
@krishicks Thanks for your approval. Looks like auto-merge hasn't enabled for this PR, would you please help merge it? |
|
Only "e2e / E2E (rust-podman-rootless, ubuntu-26.04)" failed: https://github.com/NVIDIA/OpenShell/actions/runs/29785520611/job/88499391337 E2E test Same test passed on "e2e / E2E (rust-podman-rootless, ubuntu-24.04)": https://github.com/NVIDIA/OpenShell/actions/runs/29785520611/job/88499391279. Seemingly flakiness is not related to this PR change. |
|
I found the same flakiness happened today at PR #2317, https://github.com/NVIDIA/OpenShell/actions/runs/29764446709/job/88429874012 (same job, same test). There is already an issue tracking it and a PR is opened: #2326, #2340 @krishicks Would it be safe to retry failing test or just merge it as-is? Thanks in advance! |
Summary
Emit a visible warning when an L7 endpoint uses an unsupported
accesspreset (e.g.access: allow) during proxy-side preset expansion. Previously these values were silently ignored, leaving endpoints with no expandedrulesand no diagnostic when traffic was denied.Policy load and deny behavior are unchanged. This is observability only.
Related Issue
Closes #2008
Related: #2158 (invalid
access: allowreportspolicy_denied; this PR adds the missing load-time warning but does not fix incomplete policy shape)Changes
expand_access_presetsfor unsupportedaccessvalues (read-only,read-write, andfullremain supported)access_preset_ruleshelper to centralize preset expansion logicemit_l7_config_warningshelper to deduplicate validation + expansion OCSF emissionConfigStateChangeBuilderin both OPA policy-load paths (from_proto_with_pid,preprocess_yaml_data), matching existing L7 validation warning plumbingaccess: allow(warning emitted, rules not expanded)warnings.is_empty()on existing supported-preset expansion testsaccess_preset_rulesandexpand_access_presetsinvariantsTesting
mise run pre-commitpassesChecklist